package util;
import java.util.Arrays;
import java.util.Collections;
import java.io.*;

public class Title implements Comparable{

	int titleBit;
	String titleName;
	String titleShowName;
	int titleOrder;
	
	public Title(int titleOrder,String titleName, String titleShowName){
		this.titleOrder=titleOrder;
		this.titleName=titleName;
		this.titleBit=(int)Math.pow(2, titleOrder);
		this.titleShowName=titleShowName;
	}
	
	public int getTitleBit(){
		return this.titleBit;
	}

	public int getTitleOrder(){
		return this.titleOrder;
	}

	public String getTitleName(){
		return this.titleName;
	}

	public String getTitleShowName(){
		return this.titleShowName;
	}
	
	@Override
	public int compareTo(Object o1) {
        if (this.titleOrder == ((Title) o1).titleOrder)
            return 0;
        else if ((this.titleOrder) > ((Title) o1).titleOrder)
            return 1;
        else
            return -1;
    }
	
}
